<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        .box p:first-of-type{
            color: red;
        }
        .box p:last-of-type{
            color: blue;
        }
        
    </style>
</head>
<body>
    <div class="box">
        <h1>段落</h1>
        <p>段落1</p>
        <p>段落2</p>
        <p>段落3</p>
        <section>分段1</section>
    </div>
</body>
</html>